{{include file ="admin/header.tpl"}} {{include file
="admin/navibar.tpl"}} {{include file ="admin/sidebar.tpl"}}
<div class="content">

	<div class="header">
		<div class="stats">
			<p class="stat">
				<!--span class="number"></span-->
			</p>
		</div>

		<h3 class="page-title">网站关注用户信息管理</h3>
	</div>


	<div class="container-fluid">
		<div class="row-fluid">
			<div class="block">
				<div id="page-menu" class="block-body collapse in">
					<form class="form-search" method="post" id="searchform">
						<div class="input-prepend">
							<span class="add-on">网站:</span> <input class="input-medium"
								type="text" placeholder="用户的网站" name="website" id="website"
								style="width: 135px;">
						</div>
						<div class="input-prepend">
							<span class="add-on">邮箱:</span> <input class="input-medium"
								type="text" placeholder="邮箱" name="email" id="email"
								style="width: 135px;">
						</div>
						<div class="input-prepend">
							<span class="add-on">名称:</span> <input class="input-medium"
								type="text" placeholder="名称" name="name" id="name"
								style="width: 135px;">
						</div>

						<button type="button" class="btn btn-primary" onclick="search()">查询</button>
						<button type="button" class="btn " onclick="clearSearch()">重置</button>
					</form>
				</div>
			</div>
		</div>
		<div class="block">

			<table id="grid"
				data-options="url:'admin/connecters/getpage',fitColumns:true,singleSelect:true"
				class="easyui-datagrid" toolbar="#toolbar"
				style="width: auto; height: 350px" iconCls="icon-save"
				pagination="true"　>
				<thead>
					<tr>
						<th data-options="field:'ID',checkbox:true,width:100"></th>
						<th data-options="field:'NAME',width:100">名称</th>
						<th data-options="field:'EMAIL',width:100">邮箱</th>
						<th data-options="field:'PHONE',width:100">电话号码</th>
						<th data-options="field:'WEBSITE',width:100">网站</th>
						<th data-options="field:'MESSAGE',width:100">信息</th>
						<th data-options="field:'DATE',width:120"
							,formatter="dateTimeFormat">日期</th>



					</tr>
				</thead>
			</table>
			<!--- START 分页模板 --->
			<div id="toolbar">
				<a class="easyui-linkbutton" iconCls="icons-delete" plain="true"
					onclick="removeitem()">删除</a>

			</div>

			<!--- END --->
		</div>


	</div>


	<!--- END 以下内容不需更改，请保证该TPL页内的标签匹配即可 --->
	{{include file="admin/footer.tpl" }}

	<script type="text/javascript"
		src="{{$smarty.const.WEBSITE_URL}}public/js/rmanger.js"></script>
	<script type="text/javascript">
	url = "{{$smarty.const.WEBSITE_URL}}"+"admin/connecters";
	key = "ID";
  function  dateTimeFormat(value, rec, index) {
    if (value == undefined) {
        return "";
    }
    return value.format("yyyy-mm-dd HH:MM");
}

	 
var Common = {

	    //EasyUI用DataGrid用日期格式化
	    TimeFormatter: function (value, rec, index) {
	        if (value == undefined) {
	            return "";
	        }
	        /*json格式时间转js时间格式*/
	        value = value.substr(1, value.length - 2);
	        var obj = eval('(' + "{Date: new " + value + "}" + ')');
	        var dateValue = obj["Date"];
	        if (dateValue.getFullYear() < 1900) {
	            return "";
	        }
	        var val = dateValue.format("yyyy-mm-dd HH:MM");
	        return val.substr(11, 5);
	    },
	    DateTimeFormatter: function (value, rec, index) {
	        if (value == undefined) {
	            return "";
	        }
	        /*json格式时间转js时间格式*/
	        value = value.substr(1, value.length - 2);
	        var obj = eval('(' + "{Date: new " + value + "}" + ')');
	        var dateValue = obj["Date"];
	        if (dateValue.getFullYear() < 1900) {
	            return "";
	        }

	        return dateValue.format("yyyy-mm-dd HH:MM");
	    },

	    //EasyUI用DataGrid用日期格式化
	    DateFormatter: function (value, rec, index) {
	        if (value == undefined) {
	            return "";
	        }
	        /*json格式时间转js时间格式*/
	        value = value.substr(1, value.length - 2);
	        var obj = eval('(' + "{Date: new " + value + "}" + ')');
	        var dateValue = obj["Date"];
	        if (dateValue.getFullYear() < 1900) {
	            return "";
	        }

	        return dateValue.format("yyyy-mm-dd");
	    }
	};
</script>